import request from '@/utils/request.js'

export async function addCart (params) {
  var res = await request.post('http://121.89.205.189/api/cart/add', params)
  return res.data
}

export async function getCartList (params) {
  var res = await request.post('http://121.89.205.189/api/cart/list', params)
  return res.data.data
}

export async function delCartList (params) {
  var res = await request.post('http://121.89.205.189/api/cart/remove', params)
  return res.data.data
}

export async function selectone (params) {
  var res = await request.post('http://121.89.205.189/api/cart/selectone', params)
  return res.data.data
}

export async function selectall (params) {
  var res = await request.post('http://121.89.205.189/api/cart/selectall', params)
  return res.data.data
}

export async function addOrder (params) {
  var res = await request.post('http://121.89.205.189/api/order/addOrder', params)
  return res.data
}
